<template>
  <div>
    <h1>我是子组件</h1>
    <p>我是子组件的num:{{ value }}</p>
    <button @click="one">事件</button>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      required: true
    }
  },
  methods: {
    one() {
      this.$emit('click', this.value + 1)
    }
  }
}
</script>

<style>

</style>
